import request from '@/utils/request'

export function getMajorList(data) {
  return request({
    url: '/major/selectAll',
    method: 'get',
    params: data,
  })
}

export function getMajorById(data) {
  return request({
    url: `/major/select/${data.id}`,
    method: 'get',
    params: data,
  })
}

export function updateMajor(data) {
  return request({
    url: '/major/update',
    method: 'put',
    data,
  })
}

export function insertMajor(data) {
  return request({
    url: '/major/insert',
    method: 'post',
    data,
  })
}
/**
 * 查询所有专业
 * @param
 * @returns
 */
export function getMajorAll() {
  return request({
    url: '/major/getList',
    method: 'get'
  })
}
